home *** CD-ROM | disk | FTP | other *** search
/ Pro Intralink 3.1 / Pro Intralink v3.1.iso / dsrc / templates / unix / u_cdrs_animation_to_tif.tpl < prev    next >
Encoding:
Text File  |  2001-11-27  |  2.2 KB  |  70 lines

  1. // 13-Apr-98 $$1  JJE   Created.
  2. #!/bin/csh
  3. ###
  4. ### Prepare cdrs images for mailing to Kaleidoscope Animation for
  5. ### recording on video tape
  6. ###
  7.  
  8. echo "********************************************"
  9. echo "Preparing images for recording on video tape"
  10. echo "********************************************"
  11.  
  12.  
  13. ###
  14. ### Rename animation (.imf) files to conform to Kaleidoscope
  15. ### naming conventions.
  16. ### Rename  file.nn.imf to file.00nn.imf
  17. ### (to have 4 digits of frame number)
  18. ###
  19. echo "-------------------"
  20. echo "Renaming .imf files"
  21. echo "-------------------"
  22.  
  23. set IMAGE_1 = `/bin/ls *.[0-9].imf`
  24. set IMAGE_2 = `/bin/ls *.[0-9][0-9].imf`
  25. set IMAGE_3 = `/bin/ls *.[0-9][0-9][0-9].imf`
  26. set IMAGE_4 = `/bin/ls *.[0-9][0-9][0-9][0-9].imf`
  27.  
  28. foreach FILE ($IMAGE_1)
  29.     echo $FILE
  30.     mv $FILE `echo $FILE | sed -e 's/\([a-zA-Z_0-9\-\.]*\)\([0-9]\)\(.imf\)/\1000\2\3/'`
  31. end
  32. foreach FILE ($IMAGE_2)
  33.     echo $FILE
  34.     mv $FILE `echo $FILE | sed -e 's/\([a-zA-Z_0-9\-\.]*\)\([0-9][0-9]\)\(.imf\)/\100\2\3/'`
  35. end
  36. foreach FILE ($IMAGE_3)
  37.     echo $FILE
  38.     mv $FILE `echo $FILE | sed -e 's/\([a-zA-Z_0-9\-\.]*\)\([0-9][0-9][0-9]\)\(.imf\)/\10\2\3/'`
  39. end
  40.  
  41. ##
  42. ##foreach FILE ($IMAGE_4)
  43. ##    echo $FILE
  44. ##    mv $FILE `echo $FILE | sed -e 's/\([a-zA-Z_0-9\-\.]*\)\([0-9][0-9][0-9][0-9]\)\(.imf\)/\1\2\3/'`
  45. ##end
  46.  
  47. ###
  48. ### To convert CDRS .imf files into Kaleidoscope .tif files for
  49. ### processing, laying to tape as animation.
  50. ### Notes: 1) These images are assumed to be pre-processed to use
  51. ###           4 digits in each filename (done above in this script)
  52. ###        2) This version keeps the images in gamma corrected space.
  53.  
  54. echo "---------------------------------------------------------------------"
  55. echo "Converting .imf files into .tif files (assumed to be of size 646x485)"
  56. echo "---------------------------------------------------------------------"
  57.  
  58. set IMAGES = `/bin/ls *.[0-9][0-9][0-9][0-9].imf`
  59. foreach FILE ($IMAGES)
  60.     echo $FILE
  61.     convert_image -I CDRS $FILE -O TIFF `echo $FILE | sed -e 's/\([a-zA-Z_0-9\-\.]*\)\([0-9][0-9][0-9][0-9]\)\.imf/\1\2\.tif/'`
  62. end
  63.  
  64. echo "-----------------------------------------------"
  65. echo ""
  66. echo 'Please use the "tar" command to copy .tif files'
  67. echo 'to tape (1/4" or 4mm).  On ESV:'
  68. echo "    tar cvf /dev/rmt/m4 *.tif"
  69. echo ""
  70.